<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.fuel.js" ></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A Fuel chart fetching its reading via AJAX</title>
    
    <meta name="description" content="A Fuel chart fetching its reading via AJAX" />
     
</head>
<body>
    <div style="background-color: #ffc; border: 2px solid #cc0; border-radius: 5px; padding: 5px;">
        <b>Note:</b>
        For security reasons the AJAX demos don't work offline. You can view the demos on the RGraph website here:
        <a href="http://www.rgraph.net/demos/" target="_blank" rel="nofollow">http://www.rgraph.net/demos</a>
    </div>

    <h1>A Fuel chart fetching its reading via AJAX</h1>

    <canvas id="cvs" width="200" height="200">[No canvas support]</canvas>
    
    <script>
        RGraph.AJAX.getNumber('/getdata.html', drawFuel);

        function drawFuel (num)
        {
            var fuel = new RGraph.Fuel({
                id: 'cvs',
                min: 0,
                max: 100,
                value: num
            }).draw();
        }
    </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>